POV-Ray : Newsgroups : povray.general : problem with sphere_sweep / linear_spline : problem with sphere_sweep / linear_spline Server Time
3 Aug 2024 18:24:19 EDT (-0400)
  problem with sphere_sweep / linear_spline  
From: Jeremy M  Praay
Date: 23 Nov 2003 02:46:41
Message: <3fc065e1$1@news.povray.org>
The following code seems to produce one "fat leg" and one "skinny leg", and
yet all that changes is the rotation of the sphere sweep.  The only way I
can figure to work around this, is to rotate the sphere_sweep until it gets
skinny again like it's supposed to.  And, changing the scale seems to have
an impact.  Perhaps it just does strange things with a small scale?  Or am I
doing something wrong with the sphere_sweep?

I've looked through the documentation, but I haven't come across anything.

//------------------------------------------------------
global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.0, 0.5, -4.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

plane {
  y, -1
  pigment { color rgb <0.7,0.5,0.3> }
}

#declare Leg=
  sphere_sweep {
    linear_spline
    7,
    <0,0>, 0.2,
    <1,0>, 0.15,
    <1.5,-1>, 0.15,
    <3.75,-0.6>, 0.25,
    <6,0>, 0.15,
    <7,-4>, 0.1,
    <8,-4.3>, 0.1
    scale 0.02
    rotate x*-90
 }

object { Leg scale <-1,1,1> rotate z*-40 rotate y*52 translate
<-0.045,0.59,0>
  scale 5
  translate <0,-3.5,0>
}

object { Leg scale <-1,1,1> rotate z*-40 rotate y*70 translate
<-0.045,0.59,0>
  scale 5
  translate <0.1,-3.5,0>
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.